package component.student;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.*;

import user.*;

public class HandleServlet extends HttpServlet{
	public void doPost(HttpServletRequest request,
            HttpServletResponse response)
    throws IOException, ServletException
	{
		String index=request.getParameter("index");
		String filename=request.getParameter("file");
		String classname=request.getParameter("classname");
		HttpSession session=request.getSession();
		//session.get~~~
		
		
		Student stu=(Student)session.getAttribute("student");
		String id=stu.getId();
		MessageHandle student=new MessageHandle(id);
		student.setPage(classname,filename,Integer.parseInt(index));
	}
	public void doGet(HttpServletRequest request,
            HttpServletResponse response)
    throws IOException, ServletException
    {
		doPost(request,response);
    }
}
